void main() {
  Person p = Person.of('张三', 20, '男', '北京');
  p.say();
}

class Person {
  String? name;
  int? age;
  String? gender;
  String? address;

  Person({this.name, this.age, this.gender, this.address});
  // Person.of(String name, int age, String gender, String address) {
  //   this.name = name;
  //   this.age = age;
  //   this.gender = gender;
  //   this.address = address;
  // }
  Person.of(this.name, this.age, this.gender, this.address);

  say() {
    print('我叫$name,我今年$age岁,我是一个$gender,我住在$address');
  }
}
